﻿@using SelfMadeMillionaire.Core
@using SelfMadeMillionaire.Core.Enums
@model SelfMadeMillionaire.Web.Infrastructure.ViewModels.Account.SubscriptionInfoViewModel

@using (Html.BeginForm("SubscriptionInfo", "Profile", FormMethod.Post, new {id = "subscription-form", @class = "form-horizontal"}))
{
	@Html.ValidationSummary()

	<div class="newsletter_subscribe_block">

		<div class="form-group subscribe_option">
            <h4 class="profile_title" style="padding-left:15px">Current Newsletter Subscriptions:</h4>
		</div>
        <div class="content_block_title">
            <h5>Self-Made Millionaire <a target="_blank" href="Services by Subscription Level.pdf" style="margin-left:55px">
						<img src="@Url.Content("~/Content/images/pdf_icon.png")" alt="Compare Subscription Options" title="Compare Subscription Options" />
						Compare Subscription Options</a>
            </h5>
            
            <div class="title_bottom_arrow">
					<img src="@Url.Content("~/Content/images/down_arrow.png")" alt="" />
			</div>
        </div>

		<div class="form-group" style="padding-left:20px;padding-top:20px">
			<label  class="col-sm-2 upgrade-control-label subscribe_nname custom_label">@Model.SMMSubscriptionName</label>
			
			<div class="col-sm-7">
                <table>
                @if (Model.SubscriptionLevel < SubscriptionType.Platinum)
				{
                    <tr><td style="padding-bottom:5px">
					<button class="btn btn-info paid" 
					        value="@CoreConstants.UPGRADE_TO_PLATINUM_PRODUCT" 
					        title="@Model.ProductList.First(x => x.Id == CoreConstants.UPGRADE_TO_PLATINUM_PRODUCT).ProductName">
						@Model.ProductList.First(x => x.Id == CoreConstants.UPGRADE_TO_PLATINUM_PRODUCT).CommandName
					</button>
                        </td></tr>
				}

				@if (Model.SubscriptionLevel < SubscriptionType.Gold)
				{
        <tr><td style="padding-bottom:5px">
					<button class="btn btn-info paid" 
					        value="@CoreConstants.UPGRADE_TO_GOLD_PRODUCT" 
					        title="@Model.ProductList.First(x => x.Id == CoreConstants.UPGRADE_TO_GOLD_PRODUCT).ProductName">
						@Model.ProductList.First(x => x.Id == CoreConstants.UPGRADE_TO_GOLD_PRODUCT).CommandName
					</button>
            </td></tr>
				}

				@if (Model.SubscriptionLevel < SubscriptionType.Silver)
				{
        <tr><td style="padding-bottom:5px">
					<button class="btn btn-info paid" 
					        value="@CoreConstants.UPGRADE_TO_SILVER_PRODUCT" 
					        title="@Model.ProductList.First(x => x.Id == CoreConstants.UPGRADE_TO_SILVER_PRODUCT).ProductName">
						@Model.ProductList.First(x => x.Id == CoreConstants.UPGRADE_TO_SILVER_PRODUCT).CommandName</button>
            </td></tr>
				}

				@if (Model.SubscriptionLevel < SubscriptionType.Free)
				{
        <tr><td style="padding-bottom:5px">
					<button 
						class="btn btn-info" 
						value="@CoreConstants.FREE_SUBSCRIPTION" 
						title="@Model.ProductList.First(x => x.Id == CoreConstants.FREE_SUBSCRIPTION).ProductName">
						>
						@Model.ProductList.First(x => x.Id == CoreConstants.FREE_SUBSCRIPTION).CommandName
					</button>
            </td></tr>
				}
				</table>
			</div>
		</div>
			
		<div class="form-group" style="padding-left:20px">
			<label class="col-sm-2 upgrade-control-label expires_on custom_label">Expires&nbsp;On: <span style="font-weight:normal; padding-left:10px; color:#333333;">@Model.sExpirationDate</span></label>
				
			<div class="col-sm-7">
				@if (Model.SubscriptionLevel > SubscriptionType.Free)
				{
					<button class="btn btn-info paid" 
					        value="@CoreConstants.RENEW_PRODUCT" 
					        title="@Model.ProductList.First(x => x.Id == CoreConstants.RENEW_PRODUCT).ProductName">
						@Model.ProductList.First(x => x.Id == CoreConstants.RENEW_PRODUCT).CommandName</button>
				}
			</div>
		</div>

		<div class="form-group" style="padding-left:20px">
			<label class="col-sm-2 upgrade-control-label Status custom_label">Status: <span style="font-weight: normal; padding-left:40px; color:#333333;">@Model.Status</span></label>
			
			<div class="col-sm-7">
				@if (Model.IsSMMSubscribe)
				{
					<button id="unsubscribeSMM" class="btn btn-info" title="Upgrade Subscription Level for the same Subscription time frame">Unsubscribe</button>
				}
				else
				{
					<button id="subscribeSMM" class="btn btn-info" title="Upgrade Subscription Level for the same Subscription time frame">Subscribe</button>
				}

			</div>
		</div>	
	</div>
	<!--end newsletter subscribe block-->

    <div class="balance_block">
    </div>
    
    <!--mmm newsletter subscribe block-->
	<div class="newsletter_subscribe_block">
        <div class="content_block_title">
            <h5>Maggie's Money Mountain:</h5>
            
            <div class="title_bottom_arrow">
					<img src="@Url.Content("~/Content/images/down_arrow.png")" alt="" />
			</div>
        </div>

		<div class="form-group" style="padding-left:20px;padding-top:20px">
		
			@if (!Model.IsMMMSubscribe)
			{
				<label class="col-sm-2 upgrade-control-label mmmsubsciption custom_label">No Subscription</label>
			}
			else
			{
				<label class="col-sm-2 upgrade-control-label mmmsubsciption custom_label">Free Subscription</label>
			}

		
			<div class="col-sm-7">
				@if (!Model.IsMMMSubscribe)
				{
					<button id="subscribeMMM"  class="btn btn-info" title="Upgrade Subscription Level for the same Subscription time frame">Subscribe</button>
				}
				else
				{
					<button  id="unsubscribeMMM"  class="btn btn-info" title="Upgrade Subscription Level for the same Subscription time frame">Unsubscribe</button>
				}
			</div>
		</div>
	</div>
	<!--end mmm newsletter subscribe block-->
	<style>
		.button {
			-moz-border-radius: 6px;
			-o-border-radius: 6px;
			-webkit-border-radius: 6px;
			background: #0028a9;
			border-radius: 6px;
			display: inline-block;
			float: left;
			margin-top: 10px;
			
			margin-left: 20px;
		}

		.currentproduct {
			float: left;
			background-color: darkgreen !important;
		}

		.green { background-color: darkgreen !important; }

		.upgrade-control-label {
			text-align: left !important;
			width: 200px;
		}
		
	</style>
}